package com.haixiaoke.saas.order.service.impl;

import java.util.List;

import com.haixiaoke.saas.order.domain.OrderSnapshoot;
import com.haixiaoke.saas.order.mapper.OrderSnapshootMapper;
import com.haixiaoke.saas.order.service.IOrderSnapshootService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 订单快照数据Service业务层处理
 * 
 * @author panda
 * @date 2024-04-10
 */
@Service
public class OrderSnapshootServiceImpl implements IOrderSnapshootService {
    @Autowired
    private OrderSnapshootMapper orderSnapshootMapper;

    /**
     * 查询订单快照数据
     * 
     * @param orderId 订单快照数据主键
     * @return 订单快照数据
     */
    @Override
    public OrderSnapshoot selectOrderSnapshootByOrderId(String orderId) {
        return orderSnapshootMapper.selectOrderSnapshootByOrderId(orderId);
    }

    /**
     * 查询订单快照数据列表
     * 
     * @param orderSnapshoot 订单快照数据
     * @return 订单快照数据
     */
    @Override
    public List<OrderSnapshoot> selectOrderSnapshootList(OrderSnapshoot orderSnapshoot) {
        return orderSnapshootMapper.selectOrderSnapshootList(orderSnapshoot);
    }

    /**
     * 新增订单快照数据
     * 
     * @param orderSnapshoot 订单快照数据
     * @return 结果
     */
    @Override
    public int insertOrderSnapshoot(OrderSnapshoot orderSnapshoot) {
        return orderSnapshootMapper.insertOrderSnapshoot(orderSnapshoot);
    }

    /**
     * 修改订单快照数据
     * 
     * @param orderSnapshoot 订单快照数据
     * @return 结果
     */
    @Override
    public int updateOrderSnapshoot(OrderSnapshoot orderSnapshoot) {
        return orderSnapshootMapper.updateOrderSnapshoot(orderSnapshoot);
    }

    /**
     * 批量删除订单快照数据
     * 
     * @param orderIds 需要删除的订单快照数据主键
     * @return 结果
     */
    @Override
    public int deleteOrderSnapshootByOrderIds(String[] orderIds) {
        return orderSnapshootMapper.deleteOrderSnapshootByOrderIds(orderIds);
    }

    /**
     * 删除订单快照数据信息
     * 
     * @param orderId 订单快照数据主键
     * @return 结果
     */
    @Override
    public int deleteOrderSnapshootByOrderId(String orderId) {
        return orderSnapshootMapper.deleteOrderSnapshootByOrderId(orderId);
    }

    @Override
    public OrderSnapshoot selectOrderUnsubscribeRuleByOrderId(String orderId) {
        return orderSnapshootMapper.selectOrderUnsubscribeRuleByOrderId(orderId);
    }
}
